package asteroids.model.programs.Expression;

import asteroids.model.Entity;
import asteroids.model.programs.Type;

/**
* 
* @version 0.3
* @author  Tandan Sunil, Van Deun Luca
*
*/
public class VariableLiteral extends BasicExpression implements IBooleanExpression,IDoubleExpression,IEntityExpression{

	public VariableLiteral(int line, int column, String name) {
		super(line, column, null);
		if(name == null)
			throw new IllegalArgumentException("Variable name cannot be null");
		this.variableName = name;
	}
	private String variableName;
	public String getVariableName(){
		return variableName;
	}
	private Type type;
	public void setType(Type type){
		this.type=type;
	}
	@Override
	public Type getType(){
		return type;
	}
	private double value;
	public void setValue(double value){
		this.value = value;
	}
	@Override
	public double getValue() {
		return value;
	}
	
	private boolean bool;
	public void setBoolean(boolean bool){
		this.bool =  bool;
	}
	@Override
	public boolean getBoolean() {
		return bool;
	}
	
	private Entity entity;
	public void setEntity(Entity entity){
		this.entity=entity;
	}
	public Entity getEntity(){
		return entity;
	}
	@Override
	public boolean canHaveAsEntity(Entity entity) {
		return entity!=null;
	}


}
